r = 1 SCREEN 12 COLOR 2, 0 CLS DIM SHARED DOOM AS DOUBLE Minutes = 15 Seconds = 0 GameTime = Minutes * 60 + Seconds DIM directions(1 TO 22) AS STRING directions(1) = "NORTH" directions(2) = "NORTH OR EAST" directions(3) = "NORTH OR WEST" directions(4) = "WEST OR SOUTH" directions(5) = "NORTH, SOUTH, OR EAST" directions(6) = "NORTH OR SOUTH" directions(7) = "WEST OR SOUTH" directions(8) = "NORTH OR EAST" directions(9) = "NORTH OR SOUTH" directions(10) = "SOUTH OR EAST" directions(11) = "NORTH, EAST, OR WEST" directions(12) = "EAST" directions(13) = "NORTH OR SOUTH" directions(14) = "EAST, WEST, OR SOUTH" directions(15) = "NORTH OR EAST" directions(16) = "NORTH OR SOUTH" directions(17) = "EAST OR SOUTH" directions(18) = "EAST, WEST, OR SOUTH" directions(19) = "NORTH" directions(20) = "WEST OR SOUTH" directions(21) = "NORTH OR SOUTH" directions(22) = "NORTH OR WEST" PRINT "" PRINT "" PRINT "What a nice day for a walk. Now know one knows your doing this." PRINT "Everyone thinks your at school, but it's such a nice day out." PRINT "What do they expect me to do? Stay in a boring old classroom" PRINT "on a day like this? No, no way in hell am I wasting a day like" PRINT "this." DO: LOOP UNTIL INKEY$ <> "" DOOM = TIMER(0.001) + GameTime DO CLS PRINT "" PRINT "" PRINT "" PRINT "" PRINT " The Pond" PRINT " Written by" PRINT " D.B. Taylor " PRINT " Copyright (c) 2015 " PRINT "" PRINT SPACE$(38); IF INSTR(directions(r), "NORTH") THEN PRINT "N" ELSE PRINT PRINT "*---------------------------------* "; IF INSTR(directions(r), "WEST") THEN PRINT "W"; ELSE PRINT " "; PRINT " + "; IF INSTR(directions(r), "EAST") THEN PRINT "E"; ELSE PRINT " "; PRINT " *------------------------------------*" PRINT SPACE$(38); IF INSTR(directions(r), "SOUTH") THEN PRINT "S" ELSE PRINT PRINT PRINT "If you are stuck just type HELP." PRINT GOSUB ROOM GOSUB parser LOOP ROOM: IF r = 1 THEN: GOSUB r1 IF r = 2 THEN: GOSUB r2 IF r = 3 THEN: GOSUB r3 IF r = 4 THEN: GOSUB r4 IF r = 5 THEN: GOSUB r5 IF r = 6 THEN: GOSUB r6 IF r = 7 THEN: GOSUB r7 IF r = 8 THEN: GOSUB r8 IF r = 9 THEN: GOSUB r9 IF r = 10 THEN: GOSUB r10 IF r = 11 THEN: GOSUB r11 IF r = 12 THEN: GOSUB r12 IF r = 13 THEN: GOSUB r13 IF r = 14 THEN: GOSUB r14 IF r = 15 THEN: GOSUB r15 IF r = 16 THEN: GOSUB r16 IF r = 17 THEN: GOSUB r17 IF r = 18 THEN: GOSUB r18 IF r = 19 THEN: GOSUB r19 IF r = 20 THEN: GOSUB r20 IF r = 21 THEN: GOSUB r21 IF r = 22 THEN: GOSUB r22 RETURN parser: PRINT "> "; cmd$ = GrabInput cmd$ = LTRIM$(RTRIM$(UCASE$(cmd$))) IF cmd$ = "END" OR cmd$ = "QUIT" OR cmd$ = "EXIT" OR cmd$ = "Q" THEN END END IF IF cmd$ = "HELP" OR cmd$ = "H" OR cmd$ = "?" THEN CLS PRINT "HERE ARE SOME BASIC COMMANDS THAT CAN BE USED IN THE GAME..." PRINT PRINT "NORTH, EAST ,SOUTH, AND WEST - MOVE TO AN AVAILABLE LOCATION" PRINT "ENTER - USE TO ENTER A BODY OF WATER" PRINT "RUN - TO RUN LIKE HELL" PRINT "INVENTORY - VIEW YOUR INVENTORY" PRINT "HELP - VIEW THIS SCREEN" PRINT "END - END GAME" PRINT PRINT "PRESS ANY KEY...": SLEEP DO: LOOP UNTIL INKEY$ = "" DO: LOOP UNTIL INKEY$ <> "" END IF IF cmd$ = "INVENTORY" OR cmd$ = "INV" OR cmd$ = "ITEMS" OR cmd$ = "I" THEN CLS PRINT "INVENTORY..." PRINT PRINT PRINT "PRESS ANY KEY..." DO: LOOP UNTIL INKEY$ = "" DO: LOOP UNTIL INKEY$ <> "" END IF IF cmd$ = "GO NORTH" OR cmd$ = "NORTH" OR cmd$ = "N" THEN IF r = 1 THEN: r = 2: GOTO moved IF r = 2 THEN: r = 5: GOTO moved IF r = 5 THEN: r = 6: GOTO moved IF r = 6 THEN: r = 7: GOTO moved IF r = 3 THEN: r = 4: GOTO moved IF r = 8 THEN: r = 9: GOTO moved IF r = 9 THEN: r = 10: GOTO moved IF r = 11 THEN: r = 13: GOTO moved IF r = 13 THEN: r = 14: GOTO moved IF r = 15 THEN: r = 16: GOTO moved IF r = 16 THEN: r = 17: GOTO moved IF r = 22 THEN: r = 21: GOTO moved IF r = 21 THEN: r = 20: GOTO moved IF r = 19 THEN: r = 18: GOTO moved END IF IF cmd$ = "GO EAST" OR cmd$ = "EAST" OR cmd$ = "E" THEN IF r = 2 THEN: r = 3: GOTO moved IF r = 5 THEN: r = 4: GOTO moved IF r = 8 THEN: r = 7: GOTO moved IF r = 10 THEN: r = 11: GOTO moved IF r = 11 THEN: r = 12: GOTO moved IF r = 15 THEN: r = 14: GOTO moved IF r = 14 THEN: r = 22: GOTO moved IF r = 17 THEN: r = 18: GOTO moved IF r = 18 THEN: r = 20: GOTO moved END IF IF cmd$ = "GO SOUTH" OR cmd$ = "SOUTH" OR cmd$ = "S" THEN IF r = 17 THEN: r = 16: GOTO moved IF r = 16 THEN: r = 15: GOTO moved IF r = 18 THEN: r = 19: GOTO moved IF r = 20 THEN: r = 21: GOTO moved IF r = 21 THEN: r = 22: GOTO moved IF r = 14 THEN: r = 13: GOTO moved IF r = 13 THEN: r = 11: GOTO moved IF r = 10 THEN: r = 9: GOTO moved IF r = 9 THEN: r = 8: GOTO moved IF r = 7 THEN: r = 6: GOTO moved IF r = 6 THEN: r = 5: GOTO moved IF r = 5 THEN: r = 2: GOTO moved IF r = 2 THEN: r = 1: GOTO moved IF r = 4 THEN: r = 3: GOTO moved END IF IF cmd$ = "GO WEST" OR cmd$ = "WEST" OR cmd$ = "W" THEN IF r = 3 THEN: r = 2: GOTO moved IF r = 4 THEN: r = 5: GOTO moved IF r = 7 THEN: r = 8: GOTO moved IF r = 12 THEN: r = 11: GOTO moved IF r = 11 THEN: r = 10: GOTO moved IF r = 22 THEN: r = 14: GOTO moved IF r = 14 THEN: r = 15: GOTO moved IF r = 20 THEN: r = 18: GOTO moved IF r = 18 THEN: r = 17: GOTO moved END IF IF (cmd$ = "EXAMINE FRANK") THEN CLS PRINT "He seems to be from a different era. His clothes look as if" PRINT "he's walked right off of a sitcom from the eighties." DO: LOOP UNTIL INKEY$ = "" DO: LOOP UNTIL INKEY$ <> "" END IF IF (cmd$ = "TALK TO FRANK") THEN CLS PRINT "He just looks at you and says. -You'll really love the pond." PRINT "It has a secret you just have to see.-" DO: LOOP UNTIL INKEY$ = "" DO: LOOP UNTIL INKEY$ <> "" END IF IF (cmd$ = "EXAMINE POND") AND r = 19 THEN CLS PRINT "It is your run of the mill pond. Small in size, the clear" PRINT "blue water is inviting. You see a lone slab of rock in the" PRINT "centre...How odd?" DO: LOOP UNTIL INKEY$ = "" DO: LOOP UNTIL INKEY$ <> "" END IF IF (cmd$ = "ENTER POND") AND r = 19 THEN CLS DO: LOOP UNTIL INKEY$ = "" DO: LOOP UNTIL INKEY$ <> "" GOTO lose: END IF IF (cmd$ = "RUN LIKE HELL") AND r = 19 THEN CLS DO: LOOP UNTIL INKEY$ = "" DO: LOOP UNTIL INKEY$ <> "" GOTO win: END IF moved: RETURN r1: PRINT "You enter the forest and trail leads down through the thick brush." PRINT "The tree's were in heavy patches and the air had that fresh clean smell" PRINT "to it. The sun is out and is hanging high in the blue sky." RETURN r2: PRINT "Suddenly you see frm the corner of your eye a child, roughly around your" PRINT "age. He greets you and walks up to you, telling you his name is Frank." RETURN r3: PRINT "The smell of the pine tree's gave the place an almost relaxing tone." RETURN r4: PRINT "You have that strange feeling with every step you take. An odd feeling" PRINT "comes over you. Something just doesn't feel right about this kid?" RETURN r5: PRINT "While a warm wind brushes past you. An eerie silence fills the path. This" PRINT "adds a level of fear over being alone in such a wonderful place. " RETURN r6: PRINT "The gravel path gives off the feeling of being one with nature. The" PRINT "thought of being free from the confines of school makes you feel a" PRINT "sense of being a rebel without a care in the world." RETURN r7: PRINT "You notice that Frank, is walking a few feet beside you. You can't " PRINT "but wonder just what this kids story is?" RETURN r8: PRINT "While wandering down the path, Frank starts whisling a tune, a tune you" PRINT "can't put a finger on. It's kinda creepy..." RETURN r9: PRINT "Through the tree's you can see a clearing that must be the pond. You" PRINT "remember you and your friends talking about venturing through the woods" PRINT "and spend the day at the pond. But alas they all chicken out." RETURN r10: PRINT "You feel the eye's of Frank watching you. Almost as if no one taught him" PRINT "any manners. Some kids, I tell you." RETURN r11: PRINT "The silence is broken by the call of a few birds from over head. This" PRINT "startles you just a little bit." RETURN r12: PRINT "-Don't you just love how cut off from the world. Anything can happen to you" PRINT "and no one would ever know.- What a werid thing to say?" RETURN r13: PRINT "As you clear the tree's and the path gets larger. You wonder if you should" PRINT "turn back now? But fight the urge as you have been dying for a swim for some" PRINT "time now." RETURN r14: PRINT "You arrive at the cusp of natures beauty. You give a sigh of relief and from" PRINT "the other side of the pond you see an old wooden dock." RETURN r15: PRINT "The smell of the pond lingers in the air. You wonder if this kid will ever leave" PRINT "you alone?" RETURN r16: PRINT "-I use to go here all the time with my Dad when I was kid. All the fun we" PRINT "had. It's a pity though.- Frank says to you. You look over to him with a " PRINT "strange look on your face. You can't believe what he has just said to you." RETURN r17: PRINT "You walk past the thick brush to reach the dock. The grass roughly scraps your" PRINT "legs." RETURN r18: PRINT "Finally, finally you've made it. You are just a few feet away from the dock." PRINT "You think to yourself, that this is what summers all about." RETURN r19: PRINT "You are standing on the old rickety dock. Crafted many years ago by someone" PRINT "who really loved this place. Who builds a dock for a pond? Frank, looks at you" PRINT "with a crazed look in his eyes. -I remember being here with him. It's a shame" PRINT "after the accident, he never got over it! Don't you want to go for a swim?-" RETURN r20: PRINT "The path is thick with brush but you manage to walk through it." RETURN r21: PRINT "The tall grass looks like it's been left growing for years. It's a shame" PRINT "since this is such a nice place." RETURN r22: PRINT "You notice birds flying over head and the calm feeling of almost being home?" RETURN win: COLOR 2, 0 CLS PRINT "The realisation that you are allowing this creep to control you" PRINT "from means that are unknown to you. But it makes sense to you. He" PRINT "just wanted someone to play with and have a friend forever. Sorry" PRINT "Frank, but I'm not just ready yet to have a friend like you." PRINT PRINT "Thank you for playing." DO: LOOP UNTIL INKEY$ <> "" END lose: COLOR 2, 0 CLS PRINT "You slowly walk into the pond and just as the water engulfs your body." PRINT "You look up and find Frank smiling at you and as he waves goodbye. You" PRINT "soon will be his friend forever...now will it be you who lurks in the" PRINT "forest. Hoping for another poor soul to venture forth into the pond of" PRINT "death?" DO: LOOP UNTIL INKEY$ <> "" END FUNCTION GrabInput$ x = POS(0) y = CSRLIN maxwidth = _WIDTH - x PCOPY 0, 1 'make a backup copy of the screen DO k = _KEYHIT i$ = INKEY$ LOOP UNTIL k = 0 AND INKEY$ = "" 'clear the keyboard buffer DO _LIMIT 30 PCOPY 1, 0 LOCATE y, x: PRINT Userinput$ k = _KEYHIT SELECT CASE k CASE 8 Userinput$ = LEFT$(Userinput$, LEN(Userinput$) - 1) CASE 65 TO 90, 97 TO 122, 32 Userinput$ = UCASE$(Userinput$ + CHR$(k)) END SELECT timerleft## = (DOOM - TIMER(0.001)) minutes = timerleft## \ 60 seconds = timerleft## - minutes * 60 LOCATE 2, 32: PRINT USING " ###:##.###"; minutes, seconds IF timerleft## <= 0 THEN GOTO doomed _DISPLAY LOOP UNTIL k = 13 GrabInput$ = Userinput$ _AUTODISPLAY EXIT FUNCTION doomed: CLS PRINT "As the sun begins to set, you realize your in trouble now. You race home" PRINT "leaving Frank behind and a few minutes later you arrive home only to get" PRINT "in trouble. Looks like your grounded now. Maybe it's a good thing?" _DISPLAY END END SUB